<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<script type="text/javascript">
		function run() {
			var date = new Date();

			var year = date.getFullYear(); //getYear()缺陷已经废除
			var month = date.getMonth() + 1; //从0开始
			var day = date.getDate();
			var week = date.getDay(); //星期

			var hour = date.getHours();
			var minute = date.getMinutes();
			var second = date.getSeconds();

			document.getElementById('enclock').innerHTML = new Date();
			document.getElementById('cnclock').innerHTML = year + '年' + month + '月' + day + '日' + ' ' +
				hour + '时' + minute + '分' + second + '秒';
		}
	</script>
	<style type="text/css">
		#body{
			width: 450px;
			height: 100px;
			background-color: #67B168;
			padding-left: 50px;
			padding-top: 30px;
			position: absolute;
			left: 750px;
			top: 30px;
			border-radius: 100px;
		}
		#tips{
			font-size: 20px;
			color: aqua;
			font-weight: bold;
		}
	</style>
	<body onload="window.setInterval(run, 1000);">
		<div id="body">
			<span id="tips">时钟：</span>
			<div id="enclock" style="color: #00FFFF;"></div>
			<div id="cnclock" style="color: #00FFFF;"></div>
		</div>
	</body>

</html>
